package com.shenmazong.serverwebpoem.mapper;

import com.shenmazong.serverwebpoem.pojo.TbPoetry;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Service;

/**
 * @author 田不平
 * @project server-web-poem
 * @date 2020/3/26 10:21 PM
 * http://www.shenmazong.com
 */
@Service("elasticRepository")
public interface IElasticsearchRepository extends ElasticsearchRepository<TbPoetry, Long> {
    Page<TbPoetry> findByAuthor(String author, Pageable pageable);
    Page<TbPoetry> findByTitle(String title, Pageable pageable);
}
